﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="GetArticleByMenu.ascx.cs" Inherits="NLLSite.UserControl.GetArticleByMenu" %>
<asp:ListView ID="ListView1" runat="server" DataSourceID="LinqDataSource1" 
    EnableModelValidation="True">
    
    
    
    
    <EmptyDataTemplate>
    <div class="box-center-item-tin">
        Không có bài viết nào.
        </div>
    </EmptyDataTemplate>
   
    
   
    
   
   
    <ItemSeparatorTemplate>
        <br />
    </ItemSeparatorTemplate>
    <ItemTemplate>
    <div class="box-center-item-tin" style="margin-left: -20px !important;">
                                	<a href="/bai-viet/<%# Eval("ID") %>/<%#ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>" style="float: left; margin-right: 10px; margin-bottom: 10px;">
                                	<img height="100px" width="130px" style="border: 1px solid rgb(204, 204, 204); padding: 1px;" src="<%# Eval("ThumbImage") %>"  >
                                        	</a><a href="/bai-viet/<%# Eval("ID") %>/<%#ConvertToUnSign(DataBinder.Eval(Container.DataItem, "Title").ToString())%>"><b><%# Eval("Title") %></b></a>
                                            <p style="text-align: justify;"><%# Eval("Description") %></p>
	                                </div>
    <div class="clr"></div>
        <%--<li style="">ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' />
            <br />
            MenuID:
            <asp:Label ID="MenuIDLabel" runat="server" Text='<%# Eval("MenuID") %>' />
            <br />
            Title:
            <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' />
            <br />
            ThumbImage:
            <asp:Label ID="ThumbImageLabel" runat="server" 
                Text='<%# Eval("ThumbImage") %>' />
            <br />
            Description:
            <asp:Label ID="DescriptionLabel" runat="server" 
                Text='<%# Eval("Description") %>' />
            <br />
            Content:
            <asp:Label ID="ContentLabel" runat="server" Text='<%# Eval("Content") %>' />
            <br />
            CreateDate:
            <asp:Label ID="CreateDateLabel" runat="server" 
                Text='<%# Eval("CreateDate") %>' />
            <br />
            MetaTitle:
            <asp:Label ID="MetaTitleLabel" runat="server" Text='<%# Eval("MetaTitle") %>' />
            <br />
            AuthorID:
            <asp:Label ID="AuthorIDLabel" runat="server" Text='<%# Eval("AuthorID") %>' />
            <br />
            MetaKeywords:
            <asp:Label ID="MetaKeywordsLabel" runat="server" 
                Text='<%# Eval("MetaKeywords") %>' />
            <br />
            MetaDescription:
            <asp:Label ID="MetaDescriptionLabel" runat="server" 
                Text='<%# Eval("MetaDescription") %>' />
            <br />
            MetaRobots:
            <asp:Label ID="MetaRobotsLabel" runat="server" 
                Text='<%# Eval("MetaRobots") %>' />
            <br />
            MetaAuthor:
            <asp:Label ID="MetaAuthorLabel" runat="server" 
                Text='<%# Eval("MetaAuthor") %>' />
            <br />
        </li>--%>
    </ItemTemplate>
    <LayoutTemplate>
        <ul ID="itemPlaceholderContainer" runat="server" style="">
            <li runat="server" id="itemPlaceholder" />
        </ul>
        <div id="bottom">
                                <div class="pages">
            <asp:DataPager ID="DataPager1" runat="server">
                <Fields>
                    <asp:NextPreviousPagerField ButtonType="Image" ShowFirstPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuối" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
                    <asp:NumericPagerField />
                    <asp:NextPreviousPagerField ButtonType="Image" ShowLastPageButton="True" 
                        ShowNextPageButton="False" ShowPreviousPageButton="False" FirstPageText="Trang đầu" LastPageText="Trang cuỗi" NextPageText="Sau" PreviousPageText="Trước" FirstPageImageUrl="../Templates/Images/start.gif" LastPageImageUrl="../Templates/Images/end.gif" NextPageImageUrl="../Templates/Images/next.gif" PreviousPageImageUrl="../Templates/Images/previous.gif" />
                </Fields>
            </asp:DataPager>
        </div>
        </div>
    </LayoutTemplate>
</asp:ListView>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
    ContextTypeName="DAL_Class.NLLDataContext" OrderBy="CreateDate, Title" 
    Select="new (ID, MenuID, Name, Title, ThumbImage, Description, Content, CreateDate, AuthorID, AuDescription)" 
    TableName="view_UI_ALLArticles" Where="MenuID == @MenuID">
    <WhereParameters>
        <asp:QueryStringParameter DefaultValue="1" Name="MenuID" 
            QueryStringField="menuid" Type="Int32" />
    </WhereParameters>
</asp:LinqDataSource>